﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QldtSdh.DAL.Models;

namespace QldtSdh.BLL
{
    public partial class BizNhiemVuBaoTri
    {
        public static List<NhiemVuBaoTri> GetList()
        {
            using (var db = CEMS4UG_DHKHContext.GetContext())
            {
                return db.NhiemVuBaoTriDbSet.OrderBy(e => e.TenNhiemVuBaoTri).ToList();
            }
        }

        /// <summary>
        /// Lấy theo ID
        /// </summary>
        /// <param name="maCoSoDaoTao"></param>
        /// <returns></returns>
        public static NhiemVuBaoTri GetByID(string maNhiemVu)
        {
            using (var db = CEMS4UG_DHKHContext.GetContext())
            {
                return db.NhiemVuBaoTriDbSet.Where(e => e.MaNhiemVuBaoTri == maNhiemVu).FirstOrDefault();
            }
        }
        
    }

}
